#ifndef __STANDBY_SLEEP_MODE_H_
#define __STANDBY_SLEEP_MODE_H_


enum	//for Pin State ENUM for Standby Mode Only
{
	SBSM_PinState_PreviousState=0,	//Pin State hold previous State
	SBSM_PinState_HighImpedance,	//Pin State become high impedance
};

//For details of wake up source, please refer to HW Spec - Section "Power Consumption Control - Operation Description"


/*********************@FUNCTION_HEADER_START***********
*@FUNCTION NAME:    SBSM_enterSleepMode_CPU()               	*
*                                                               					*
*@DESCRIPTION:  MCU changes from Normal to Sleep Mode           *
*				Wake Up from: 	NMI Interrupt				*
*								Any Interrupt				*
*                                               		                				*
***********************@FUNCTION_HEADER_END************/
void SBSM_enterSleepMode_CPU();

/*********************@FUNCTION_HEADER_START***********
*@FUNCTION NAME:    SBSM_enterSleepMode_Bus()   	*
*                                                               					*
*@DESCRIPTION:  MCU changes from Normal to Sleep Mode           *
*				Wake Up from: 	NMI Interrupt				*
*								Any Interrupt(Exclude CAN if on-chip bus clock (HCLK) is selected as CAN prescaler Clock)
*                                               		                				*
***********************@FUNCTION_HEADER_END************/
void SBSM_enterSleepMode_Bus();

/*********************@FUNCTION_HEADER_START***********
*@FUNCTION NAME:    SBSM_enterStandbyMode_Watch()              	*
*                                                               					*
*@DESCRIPTION:  MCU changes from Normal to Standby Mode(Watch)*
*				Wake Up from: 	NMI Interrupt				*
*								RTC Interrupt				*
*								External Interrupt			*
*					                                                               *
*@PARAMETER:	a_nPinState_ENUM -IO Pin State	during standby*
*                                                             			  			*
*                                               		                				*
***********************@FUNCTION_HEADER_END************/
void SBSM_enterStandbyMode_Watch(unsigned char a_nPinState_ENUM);

/*********************@FUNCTION_HEADER_START***********
*@FUNCTION NAME:    SBSM_enterStandbyMode_Watch_ShutDown()              	*
*                                                               					*
*@DESCRIPTION:  MCU changes from Normal to Standby Mode(Watch)*
*				Wake Up from: 	NMI Interrupt				*
*								RTC Interrupt				*
*								External Interrupt			*
*					                                                               *
*@PARAMETER:	a_nPinState_ENUM -IO Pin State	during standby*
*                                                             			  			*
*                                               		                				*
***********************@FUNCTION_HEADER_END************/
void SBSM_enterStandbyMode_Watch_ShutDown(unsigned char a_nPinState_ENUM);


/*********************@FUNCTION_HEADER_START***********
*@FUNCTION NAME:    SBSM_enterStandbyMode_Stop()              	*
*                                                               					*
*@DESCRIPTION:  MCU changes from Normal to Standby Mode(Stop)*
*				Wake Up from: 	NMI Interrupt				*
*								External Interrupt			*
*					                                                               *
*@PARAMETER:	a_nPinState_ENUM -IO Pin State	during standby*
*                                                             			  			*
*                                               		                				*
***********************@FUNCTION_HEADER_END************/
void SBSM_enterStandbyMode_Stop(unsigned char a_nPinState_ENUM);


/*********************@FUNCTION_HEADER_START***********
*@FUNCTION NAME:    SBSM_enterStandbyMode_Stop()              	*
*                                                               					*
*@DESCRIPTION:  MCU changes from Normal to Standby Mode(Stop)*
*				Wake Up from: 	NMI Interrupt				*
*								External Interrupt			*
*					                                                               *
*@PARAMETER:	a_nPinState_ENUM -IO Pin State	during standby*
*                                                             			  			*
*                                               		                				*
***********************@FUNCTION_HEADER_END************/
void SBSM_enterStandbyMode_Stop_ShutDown(unsigned char a_nPinState_ENUM);

//------------------------------------------------------------------
void Software_Reset();

#endif
